//
//  DetailsViewTableViewCell.swift
//  BusinessIOS
//
//  Created by Rain on 2018/11/9.
//  Copyright © 2018 XingJian Li. All rights reserved.
//

import UIKit

class DetailsViewTableViewCell: UITableViewCell {

    var nameLabel:UILabel!
    
    var DetailsLabel:UILabel!
    
    
    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
        
    }
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.lauoutUI()
        
    }
    
    func lauoutUI(){
        
        self.nameLabel = UILabel()
    
        self.nameLabel.textColor = UIColor.blue
        
        self.nameLabel.font = UIFont.systemFont(ofSize:14)//一般方法
        self.contentView.addSubview(self.nameLabel!)
        
        self.DetailsLabel = UILabel()
        self.DetailsLabel.font = UIFont.systemFont(ofSize:14)//一般方法
        self.DetailsLabel.textColor = UIColor.black
        self.contentView.addSubview(self.DetailsLabel!)
        
  
        self.layoutView()
        
    }
    func layoutView() {
        
        self.nameLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self.snp.top).offset(0)
            make.left.equalTo(self.snp.left).offset(10)
            make.right.equalTo(self.snp.right).offset(-10)
            make.height.equalTo(40)
        }
        
        self.DetailsLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self.nameLabel.snp.bottom).offset(0)
            make.left.equalTo(self.snp.left).offset(10)
            make.right.equalTo(self.snp.right).offset(-10)
            make.height.equalTo(40)
        }
        
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
